//
// Created by grg on 2020/8/4.
// Copyright (c) 2020 龚任根. All rights reserved.
//

#ifndef TEST_CPP_PROJECT_TTFCOMPONENT_H
#define TEST_CPP_PROJECT_TTFCOMPONENT_H

#include "SDL2_ttf/SDL_ttf.h"
#include "GameWindowConfig.h"

class TTFComponent {

private:
    TTF_Font * hyshangweishoushuw = nullptr;

public:
    TTFComponent(){
        TTF_Init();
        hyshangweishoushuw = TTF_OpenFont(ttfPath("HYShangWeiShouShuW.ttf"), 28);
    }
    ~TTFComponent(){
        TTF_CloseFont(hyshangweishoushuw);
        TTF_Quit();
    }

    TTF_Font *getHyshangweishoushuw() const {
        return hyshangweishoushuw;
    }

};


#endif //TEST_CPP_PROJECT_TTFCOMPONENT_H
